﻿@model QuanLyCayXanh.Models.Tree
<table class="pure-table pure-table-bordered" width="100%">
    <thead>
        <tr>
            <th>@Html.DisplayNameFor(model => model.NameVietNam)</th>
            <th>@Html.DisplayNameFor(model => model.ScientificName)</th>
            <th>@Html.DisplayNameFor(model => model.FamilyTree.Name)</th>
            <th>@Html.DisplayNameFor(model => model.GroupOfTree.Name)</th>
            <th>@Html.DisplayNameFor(model => model.DateOfPlanting)</th>
            <th>@Html.DisplayNameFor(model => model.PointX)</th>
            <th>@Html.DisplayNameFor(model => model.PointY)</th>
        </tr>
    </thead>
    <tr>
        <td>@Html.DisplayFor(model => model.NameVietNam)</td>
        <td>@Html.DisplayFor(model => model.ScientificName)</td>
        <td>@Html.DisplayFor(model => model.FamilyTree.Name)</td>
        <td>@Html.DisplayFor(model => model.GroupOfTree.Name)</td>
        <td>@Html.DisplayFor(model => model.DateOfPlanting)</td>
        <td>@Html.DisplayFor(model => model.PointX)</td>
        <td>@Html.DisplayFor(model => model.PointY)</td>
    </tr>
</table>

<table class="pure-table pure-table-bordered" width="100%" style="margin-top:30px;">
    <thead>
        <tr>
            <th>STT</th>            
            <th>
                Chiều cao
            </th>
            <th>
                Đường kính
            </th>
            <th>
                Ghi chú
            </th>
            <th>
                Đánh giá
            </th>
            <th>
                Hình ảnh
            </th>
            <th>
                Video
            </th>
            <th>
                Ngày khảo sát
            </th>            
        </tr>
    </thead>

    @{
        int count = 0;

    }
    @foreach (QuanLyCayXanh.Models.Report item in ViewBag.report)
    {
        count = count + 1;
        string trClass = count % 2 == 1 ? "" : "pure-table-odd";
        <tr class="@trClass">
            <td>@count</td>            
            <td>
                @Html.DisplayFor(modelItem => item.Height)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Diameter)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Note)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Rating)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Image)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Video)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DateOfReference)
            </td>
            
        </tr>
    }

</table>